/*Reads again from the stdin but in while a little bit different*/

#include <iostream>
#include <string>
#include <iomanip>
#include <ios>
#include <algorithm>
#include <vector>

using namespace std;

int main(){

    string name ;

    cout << "Gir lan adını :" << endl;

    cin >> name;

    //Try here new stuff
    cout << "Gir ödev notlarını bakam Enter'a basa basa gel!"
         << "Bitirmek icin EOF gir";


    //vectorlu halini yapalim
    vector<double> homew;
    double x ; //Bunu icine okicaz bbg1 e donduk ya 

    while(cin >> x){
        homew.push_back(x);

    }

    typedef vector<double> :: size_type vector_size;
    vector_size sizer = homew.size();


    if (sizer==0){
    
        cout << "Salak salak isler yapma gir notlari"
             << "Hepimiz girdik zamanında ";

        return 1;

    }

    sort(homew.begin(),homew.end());
    vector_size middle = sizer/2;
    double median ;

    //bul ortayı
    if (sizer%2==0)
        median=(homew[middle]+homew[middle+1])/2;
    else
        median=homew[middle];

    streamsize prec = cout.precision();

    cout << "Ortalamasi susu :" << setprecision(3)
         << median
         << setprecision(prec) << endl;

    return 0;

}


